<div ng-controller="PrintCtrl" ng-init="templateAction()">
    <ul class="sui-breadcrumb">
        <li>打印模板设置</li>
        <li>
            <span class="sui-form sui-form pull-right"> 
                <print-template typeid="{{type_id}}" clallback="getlist(typeid)"></print-template>
                </span>
        </li>
    </ul>
    <div>
        <print-type-tab ng-model="chosedType" click-tab="getlist()"></print-type-tab>
        <table class="sui-table table-bordered" ng-repeat=" (tpMlkey, prints) in tpMl">
            <thead>
                <tr>
                    <th colspan="4">
                        <carryway-type ng-model="tpMlkey" stype="1"></carryway-type>
                        <!-- <span class="pull-right" ng-if="dfExpress.shipping_corp !== tpMlkey">
                            <input   type="checkbox" ng-click="ExpressDefault(tpMlkey)" >设置默认
                        </span>
                            <span class="pull-right" style="color:green;" ng-if="dfExpress.shipping_corp == tpMlkey">默认快递公司</span> -->
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="print in prints">
                    <td>{{print.name}}</td>
                    <td>
                        <carryway-type ng-model="print.shipping_corp" stype="1"></carryway-type>
                    </td>
                    <td>
                        <xiaopiao-type ng-model="print.xiaopiao_type" stype="1"></carryway-type>
                    </td>
                    <!--  <td>
                            <def-printer ng-model="print.default_printer" printid="{{print.print_id}}" check="saveprinter(updata)"></def-printer>
                            <table class="sui-table table-bordered" style="margin-top:5px " ng-show="print.default_printer.length">
                                <tbody>
                                    <tr ng-repeat="item in print.default_printer">
                                        <td>
                                            {{item}}
                                        </td>
                                        <td>
                                            <button type="button" class="sui-btn btn-danger" ng-click="delprint(item,print.default_printer,print.print_id)">{{'delete'|translate}}</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td> -->
                    <!-- <td>
                            <span class="pull-right" ng-if="!print.default_template"><input   type="checkbox" ng-click="NewcheckDefault(print,tpMlkey)" >设置默认</span>
                            <span class="pull-right" style="color:green;" ng-if="print.default_template">默认模板</span>
                        </td> -->
                    <td>
                        <a href="#/print/add?id={{print.print_id}}&type_id={{type_id}}" class="sui-btn btn-primary"> {{'edit' | translate}}</a>
                        <button ng-click="deleteTmp(print.print_id,$event)" class="sui-btn btn-danger"> {{'delete' | translate}}</button>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <!-- 分页start -->
    <pager page-no="1" page-size="pageSize" total="printTotal" get-data="getlist(pageNo)"></pager>
    <!-- 分页end -->
</div>